#ifndef SEARCHBOX_H
#define SEARCHBOX_H

#include <QLineEdit>
#include <QString>

class QFocusEvent;

class SearchBox : public QLineEdit {
    Q_OBJECT

    public:
        SearchBox( QWidget * parent = 0 );
        QString preservedText();

    public slots:
        void setText( QString text );
        void preserveText();

    protected:
        void focusInEvent( QFocusEvent * e );
        void focusOutEvent( QFocusEvent * e );

    private:
        QString mPreservedText;
};

#endif
